<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Đặng Khánh Trung
 * Date: 11/2/12
 * Time: 11:33 AM
 * To change this template use File | Settings | File Templates.
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$document = JFactory::getDocument();

$chitietcongtac = $this->get('chitietcongtac');
$canbo = $this->get('canbo');
?>

<div id="crumbs">
    <div style="color: #222222;font-weight: normal;margin: 0;padding: 0">
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=vast') ?>">Trang chủ</a> »
        <span>Cơ cấu tổ chức</span> »
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=chitietcanbo&id=' . $canbo->id); ?>"><?php echo $canbo->hoten; ?></a> »
        <span>Xem chi tiết công tác</span>
    </div>
</div>

<div id="main" class="home">
    <h3 class="title green">Tra cứu thông tin công tác của cán bộ <?php echo $canbo->hoten; ?></h3>
    
    <div class="single" style="margin-left: 10px;">
        <p style="text-align:justify;text-justify:inter-word;">
            <strong style="text-indent: 20px;">
                + Tên cán bộ:
            </strong>
            <?php if (isset($canbo->hoten) && !is_null($canbo->hoten)) echo $canbo->hoten; ?>
        </p>
        
        <?php if (isset($chitietcongtac->tendonvi) && !is_null($chitietcongtac->tendonvi)): ?>
            <p style="text-align:justify;text-justify:inter-word;">
                <strong style="text-indent: 20px;">
                    + Tên đơn vị đang công tác:
                </strong>
                <?php echo $chitietcongtac->tendonvi; ?>
            </p>
        <?php endif; ?>    
        <?php if (isset($chitietcongtac->tenphong) && !is_null($chitietcongtac->tenphong)): ?>
            <p style="text-align:justify;text-justify:inter-word;">
                <strong style="text-indent: 20px;">
                    + Tên phòng đang công tác:
                </strong>
                <?php echo $chitietcongtac->tenphong; ?>
            </p>
        <?php endif; ?>    
        <?php if ($chitietcongtac->lanhdao == 1): ?>
            <p style="text-align:justify;text-justify:inter-word;">
                <strong style="text-indent: 20px;">
                    + Hiện đang là lãnh đạo với chức vụ:
                </strong>
                <?php echo $chitietcongtac->chucdanh; ?>
            </p>            
        <?php endif; ?>
        <?php if (isset($chitietcongtac->batdau) && !is_null($chitietcongtac->batdau)): ?>
            <p style="text-align:justify;text-justify:inter-word;">
                <strong style="text-indent: 20px;">
                    + Ngày bắt đầu nhận công tác:
                </strong>
                <?php echo date('d/m/Y', strtotime($chitietcongtac->batdau)); ?>
            </p>
        <?php endif; ?>        
        <?php if (isset($chitietcongtac->ketthuc) && !is_null($chitietcongtac->ketthuc)): ?>
            <p style="text-align:justify;text-justify:inter-word;">
                <strong style="text-indent: 20px;">
                    + Ngày kết thúc công tác:
                </strong>
                <?php echo date('d/m/Y', strtotime($chitietcongtac->ketthuc)); ?>
            </p>
        <?php endif; ?>        
        <?php if (isset($chitietcongtac->mota) && !is_null($chitietcongtac->mota)): ?>
            <p style="text-align:justify;text-justify:inter-word;">
                <strong style="text-indent: 20px;">
                    + Làm việc:
                </strong>
                <?php echo $chitietcongtac->mota; ?>
            </p>
        <?php endif; ?>        
    </div>
    
    <hr style="height: 0px; border-top-color: #00ccff; border-right-color: #00ccff; border-bottom-color: #00ccff; border-left-color: #00ccff; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed;"/>
    
    <div style="float: left; width: 680px;">
        <?php
        if (isset($_SERVER['HTTP_REFERER']))
        {
            $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
            echo '<a title="Quay lại" href="' . $url . '"><span style="left: 600px; position: relative;">&laquo; Quay lại</span></a>';            
        }
        ?>    
    </div>
    
</div>